package com.bean;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;


/**
 * Userinfo entity. @author MyEclipse Persistence Tools
 */

public class Userinfo  implements java.io.Serializable {


    // Fields    

     /** serialVersionUID*/
	private static final long serialVersionUID = 7252259547555873214L;
	private Long userId;
     private String phone;
     private String userPasswd;
     private String carNo;
     private String realName;
     private String introduction;
     private String userPhoto;
     private String idCard;
     private Double accountBalance;
     private Integer score;
     private Integer credit;
     private String payPasswd;
     private Short gender;
     private String email;
     private Short clientType;
     private String typeName;
     private String udid;
     private String loginSequence;
     private String userToken;
     private Timestamp loginTime;
     private String clientId;
     private Timestamp createTime;
     private Timestamp updateTime;
     private Short status;
     private String statusName;
     private String genderName;
     private Set parkComments = new HashSet(0);
     private Set userFavorites = new HashSet(0);
     private Set parkOrders = new HashSet(0);
     private Set parkReports = new HashSet(0);
     private Set userAccountRecords = new HashSet(0);
     private Set userCreditRecords = new HashSet(0);
     private Set userScoreRecords = new HashSet(0);
     
     //
     private Integer year;
  	 private Integer month;
  	 private Integer day;
  	 private Long sumcount;

    // Constructors

    /** default constructor */
    public Userinfo() {
    }
    public Userinfo(Integer year,Integer month,Integer day,Long sumcount,Short status) {
    	this.year=year;
    	this.month=month;
    	this.day=day;
    	this.sumcount=sumcount;
    	this.status=status;
    }
    public Userinfo(Integer year,Integer month,Long sumcount,Short status) {
    	this.year=year;
    	this.month=month;
    	this.sumcount=sumcount;
    	this.status=status;
    }
    
	/** minimal constructor */
    public Userinfo(String phone, String userPasswd, String carNo, Integer score, Integer credit, Timestamp createTime, Timestamp updateTime, Short status) {
        this.phone = phone;
        this.userPasswd = userPasswd;
        this.carNo = carNo;
        this.score = score;
        this.credit = credit;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.status = status;
    }
    
    /** full constructor */
    public Userinfo(String phone, String userPasswd, String carNo, String realName, String introduction, String userPhoto, String idCard, Double accountBalance, Integer score, Integer credit, String payPasswd, Short gender, String email, Short clientType, String udid, String loginSequence, String userToken, Timestamp loginTime, String clientId, Timestamp createTime, Timestamp updateTime, Short status, Set parkComments, Set userFavorites, Set parkOrders, Set parkReports, Set userAccountRecords, Set userCreditRecords, Set userScoreRecords) {
        this.phone = phone;
        this.userPasswd = userPasswd;
        this.carNo = carNo;
        this.realName = realName;
        this.introduction = introduction;
        this.userPhoto = userPhoto;
        this.idCard = idCard;
        this.accountBalance = accountBalance;
        this.score = score;
        this.credit = credit;
        this.payPasswd = payPasswd;
        this.gender = gender;
        this.email = email;
        this.clientType = clientType;
        this.udid = udid;
        this.loginSequence = loginSequence;
        this.userToken = userToken;
        this.loginTime = loginTime;
        this.clientId = clientId;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.status = status;
        this.parkComments = parkComments;
        this.userFavorites = userFavorites;
        this.parkOrders = parkOrders;
        this.parkReports = parkReports;
        this.userAccountRecords = userAccountRecords;
        this.userCreditRecords = userCreditRecords;
        this.userScoreRecords = userScoreRecords;
    }

   
    // Property accessors

    public Long getUserId() {
        return this.userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getPhone() {
        return this.phone;
    }
    
    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getUserPasswd() {
        return this.userPasswd;
    }
    
    public void setUserPasswd(String userPasswd) {
        this.userPasswd = userPasswd;
    }

    public String getCarNo() {
        return this.carNo;
    }
    
    public void setCarNo(String carNo) {
        this.carNo = carNo;
    }

    public String getRealName() {
        return this.realName;
    }
    
    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getIntroduction() {
        return this.introduction;
    }
    
    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getUserPhoto() {
        return this.userPhoto;
    }
    
    public void setUserPhoto(String userPhoto) {
        this.userPhoto = userPhoto;
    }

    public String getIdCard() {
        return this.idCard;
    }
    
    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public Double getAccountBalance() {
        return this.accountBalance;
    }
    
    public void setAccountBalance(Double accountBalance) {
        this.accountBalance = accountBalance;
    }

    public Integer getScore() {
        return this.score;
    }
    
    public void setScore(Integer score) {
        this.score = score;
    }

    public Integer getCredit() {
        return this.credit;
    }
    
    public void setCredit(Integer credit) {
        this.credit = credit;
    }

    public String getPayPasswd() {
        return this.payPasswd;
    }
    
    public void setPayPasswd(String payPasswd) {
        this.payPasswd = payPasswd;
    }

    public Short getGender() {
        return this.gender;
    }
    
    public void setGender(Short gender) {
    	if(gender==null)
    		return;
        this.gender = gender;
        //司机用户性别:；1：男2：女
        switch(gender){
        case 1:
        	this.setGenderName("男");
        	break;
        case 2:
        	this.setGenderName("女");
        	break;
        default:
        	this.setGenderName("异常");
        }
    }

    public String getEmail() {
        return this.email;
    }
    
    public void setEmail(String email) {
        this.email = email;
    }

    public Short getClientType() {
        return this.clientType;
    }
    
    public void setClientType(Short clientType) {
    	if(clientType==null)
    		return ;
        this.clientType = clientType;
        //登录终端类型（1：Android；2：IOS；3：WPhone）
        switch(clientType){
        case 1:
        	this.setTypeName("Android");
        	break;
        case 2:
        	this.setTypeName("IOS");
        	break;
        case 3:
        	this.setTypeName("WPhone");
        	break;
        default:
        	this.setTypeName("未知");
        }
        
    }

    public String getUdid() {
        return this.udid;
    }
    
    public void setUdid(String udid) {
        this.udid = udid;
    }

    public String getLoginSequence() {
        return this.loginSequence;
    }
    
    public void setLoginSequence(String loginSequence) {
        this.loginSequence = loginSequence;
    }

    public String getUserToken() {
        return this.userToken;
    }
    
    public void setUserToken(String userToken) {
        this.userToken = userToken;
    }

    public Timestamp getLoginTime() {
        return this.loginTime;
    }
    
    public void setLoginTime(Timestamp loginTime) {
        this.loginTime = loginTime;
    }

    public String getClientId() {
        return this.clientId;
    }
    
    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public Timestamp getCreateTime() {
        return this.createTime;
    }
    
    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Timestamp getUpdateTime() {
        return this.updateTime;
    }
    
    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    public Short getStatus() {
        return this.status;
    }
    
    public void setStatus(Short status) {
        this.status = status;
        
        //司机用户状态:-1：已删除；0：锁定；1：正常
       switch(status){
        case -1:
        	this.setStatusName("已删除");
        	break;
        case 0:
        	this.setStatusName("锁定");
        	break;
        case 1:
        	this.setStatusName("正常");
        	break;
        default:
        	this.setStatusName("异常");
        }
        
    }

    public Set getParkComments() {
        return this.parkComments;
    }
    
    public void setParkComments(Set parkComments) {
        this.parkComments = parkComments;
    }

    public Set getUserFavorites() {
        return this.userFavorites;
    }
    
    public void setUserFavorites(Set userFavorites) {
        this.userFavorites = userFavorites;
    }

    public Set getParkOrders() {
        return this.parkOrders;
    }
    
    public void setParkOrders(Set parkOrders) {
        this.parkOrders = parkOrders;
    }

    public Set getParkReports() {
        return this.parkReports;
    }
    
    public void setParkReports(Set parkReports) {
        this.parkReports = parkReports;
    }

    public Set getUserAccountRecords() {
        return this.userAccountRecords;
    }
    
    public void setUserAccountRecords(Set userAccountRecords) {
        this.userAccountRecords = userAccountRecords;
    }

    public Set getUserCreditRecords() {
        return this.userCreditRecords;
    }
    
    public void setUserCreditRecords(Set userCreditRecords) {
        this.userCreditRecords = userCreditRecords;
    }

    public Set getUserScoreRecords() {
        return this.userScoreRecords;
    }
    
    public void setUserScoreRecords(Set userScoreRecords) {
        this.userScoreRecords = userScoreRecords;
    }

	public String getStatusName() {
		return statusName;
	}

	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}

	public String getGenderName() {
		return genderName;
	}

	public void setGenderName(String genderName) {
		this.genderName = genderName;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public Integer getYear() {
		return year;
	}

	public void setYear(Integer year) {
		this.year = year;
	}

	public Integer getMonth() {
		return month;
	}

	public void setMonth(Integer month) {
		this.month = month;
	}

	public Integer getDay() {
		return day;
	}

	public void setDay(Integer day) {
		this.day = day;
	}

	public Long getSumcount() {
		return sumcount;
	}

	public void setSumcount(Long sumcount) {
		this.sumcount = sumcount;
	}
}